3.285 \(\int \frac {(a B+b B \cos (c+d x)) \sec (c+d x)}{a+b \cos (c+d x)} \, dx\)

Optimal. Leaf size=12 \[ \frac {B \tanh ^{-1}(\sin (c+d x))}{d} \]

[Out]

B*arctanh(sin(d*x+c))/d

________________________________________________________________________________________

Rubi [A]  time = 0.01, antiderivative size = 12, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 32, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.062, Rules used = {21, 3770} \[ \frac {B \tanh ^{-1}(\sin (c+d x))}{d} \]

Antiderivative was successfully verified.

[In]

Int[((a*B + b*B*Cos[c + d*x])*Sec[c + d*x])/(a + b*Cos[c + d*x]),x]

[Out]

(B*ArcTanh[Sin[c + d*x]])/d

Rule 21

Int[(u_.)*((a_) + (b_.)*(v_))^(m_.)*((c_) + (d_.)*(v_))^(n_.), x_Symbol] :> Dist[(b/d)^m, Int[u*(c + d*v)^(m +
 n), x], x] /; FreeQ[{a, b, c, d, n}, x] && EqQ[b*c - a*d, 0] && IntegerQ[m] && ( !IntegerQ[n] || SimplerQ[c +
 d*x, a + b*x])

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin {align*} \int \frac {(a B+b B \cos (c+d x)) \sec (c+d x)}{a+b \cos (c+d x)} \, dx &=B \int \sec (c+d x) \, dx\\ &=\frac {B \tanh ^{-1}(\sin (c+d x))}{d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.00, size = 12, normalized size = 1.00 \[ \frac {B \tanh ^{-1}(\sin (c+d x))}{d} \]

Antiderivative was successfully verified.

[In]

Integrate[((a*B + b*B*Cos[c + d*x])*Sec[c + d*x])/(a + b*Cos[c + d*x]),x]

[Out]

(B*ArcTanh[Sin[c + d*x]])/d

________________________________________________________________________________________

fricas [B]  time = 1.09, size = 31, normalized size = 2.58 \[ \frac {B \log \left (\sin \left (d x + c\right ) + 1\right ) - B \log \left (-\sin \left (d x + c\right ) + 1\right )}{2 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a*B+b*B*cos(d*x+c))*sec(d*x+c)/(a+b*cos(d*x+c)),x, algorithm="fricas")

[Out]

1/2*(B*log(sin(d*x + c) + 1) - B*log(-sin(d*x + c) + 1))/d

________________________________________________________________________________________

giac [B]  time = 0.45, size = 47, normalized size = 3.92 \[ \frac {B \log \left ({\left | \frac {1}{\sin \left (d x + c\right )} + \sin \left (d x + c\right ) + 2 \right |}\right ) - B \log \left ({\left | \frac {1}{\sin \left (d x + c\right )} + \sin \left (d x + c\right ) - 2 \right |}\right )}{4 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a*B+b*B*cos(d*x+c))*sec(d*x+c)/(a+b*cos(d*x+c)),x, algorithm="giac")

[Out]

1/4*(B*log(abs(1/sin(d*x + c) + sin(d*x + c) + 2)) - B*log(abs(1/sin(d*x + c) + sin(d*x + c) - 2)))/d

________________________________________________________________________________________

maple [A]  time = 0.07, size = 20, normalized size = 1.67 \[ \frac {B \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a*B+b*B*cos(d*x+c))*sec(d*x+c)/(a+b*cos(d*x+c)),x)

[Out]

1/d*B*ln(sec(d*x+c)+tan(d*x+c))

________________________________________________________________________________________

maxima [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a*B+b*B*cos(d*x+c))*sec(d*x+c)/(a+b*cos(d*x+c)),x, algorithm="maxima")

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(4*b^2-4*a^2>0)', see `assume?`
 for more details)Is 4*b^2-4*a^2 positive or negative?

________________________________________________________________________________________

mupad [B]  time = 0.49, size = 16, normalized size = 1.33 \[ \frac {2\,B\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((B*a + B*b*cos(c + d*x))/(cos(c + d*x)*(a + b*cos(c + d*x))),x)

[Out]

(2*B*atanh(tan(c/2 + (d*x)/2)))/d

________________________________________________________________________________________

sympy [A]  time = 3.81, size = 39, normalized size = 3.25 \[ \begin {cases} \frac {B \log {\left (\tan {\left (c + d x \right )} + \sec {\left (c + d x \right )} \right )}}{d} & \text {for}\: d \neq 0 \\\frac {x \left (B a + B b \cos {\relax (c )}\right ) \sec {\relax (c )}}{a + b \cos {\relax (c )}} & \text {otherwise} \end {cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a*B+b*B*cos(d*x+c))*sec(d*x+c)/(a+b*cos(d*x+c)),x)

[Out]

Piecewise((B*log(tan(c + d*x) + sec(c + d*x))/d, Ne(d, 0)), (x*(B*a + B*b*cos(c))*sec(c)/(a + b*cos(c)), True)
)

________________________________________________________________________________________